
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>网上商城系统</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" th:href="@{/adminlte/bower_components/bootstrap/dist/css/bootstrap.min.css}">
  <!-- Font Awesome -->
  <link rel="stylesheet" th:href="@{/adminlte/bower_components/font-awesome/css/font-awesome.min.css}">
  <!-- Ionicons -->
  <link rel="stylesheet" th:href="@{/adminlte/bower_components/Ionicons/css/ionicons.min.css}">
  <!-- DataTables -->
  <link rel="stylesheet" th:href="@{/adminlte/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css}">
  <!-- Theme style -->
  <link rel="stylesheet" th:href="@{/adminlte/dist/css/AdminLTE.min.css}">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" th:href="@{/adminlte/dist/css/skins/_all-skins.min.css}">

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <header class="main-header">
    <!-- Logo -->
    <a th:href="@{/adminlte/indextest.jsp}" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>商城</b></span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>网上商城系统</b></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- Messages: style can be found in dropdown.less-->
          <li class="dropdown messages-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-envelope-o"></i>
              <span class="label label-success">4</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 4 messages</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li><!-- start message -->
                    <a href="#">
                      <div class="pull-left">
                        <img th:src="@{/adminlte/dist/img/user2-160x160.jpg}" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Support Team
                        <small><i class="fa fa-clock-o"></i> 5 mins</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <!-- end message -->
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img th:src="@{/adminlte/dist/img/user3-128x128.jpg}" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        AdminLTE Design Team
                        <small><i class="fa fa-clock-o"></i> 2 hours</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img th:src="@{/adminlte/dist/img/user4-128x128.jpg}" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Developers
                        <small><i class="fa fa-clock-o"></i> Today</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img th:src="@{/adminlte/dist/img/user3-128x128.jpg}" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Sales Department
                        <small><i class="fa fa-clock-o"></i> Yesterday</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <div class="pull-left">
                        <img th:src="@{/adminlte/dist/img/user4-128x128.jpg}" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Reviewers
                        <small><i class="fa fa-clock-o"></i> 2 days</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="#">See All Messages</a></li>
            </ul>
          </li>
          <!-- Notifications: style can be found in dropdown.less -->
          <li class="dropdown notifications-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-bell-o"></i>
              <span class="label label-warning">10</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 10 notifications</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li>
                    <a href="#">
                      <i class="fa fa-users text-aqua"></i> 5 new members joined today
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
                      page and may cause design problems
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-users text-red"></i> 5 new members joined
                    </a>
                  </li>

                  <li>
                    <a href="#">
                      <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                    </a>
                  </li>
                  <li>
                    <a href="#">
                      <i class="fa fa-user text-red"></i> You changed your username
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="#">View all</a></li>
            </ul>
          </li>
          <!-- Tasks: style can be found in dropdown.less -->
          <li class="dropdown tasks-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-flag-o"></i>
              <span class="label label-danger">9</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 9 tasks</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li><!-- Task item -->
                    <a href="#">
                      <h3>
                        Design some buttons
                        <small class="pull-right">20%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">20% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                  <li><!-- Task item -->
                    <a href="#">
                      <h3>
                        Create a nice theme
                        <small class="pull-right">40%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">40% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                  <li><!-- Task item -->
                    <a href="#">
                      <h3>
                        Some task I need to do
                        <small class="pull-right">60%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">60% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                  <li><!-- Task item -->
                    <a href="#">
                      <h3>
                        Make beautiful transitions
                        <small class="pull-right">80%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar"
                             aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">80% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  <!-- end task item -->
                </ul>
              </li>
              <li class="footer">
                <a href="#">View all tasks</a>
              </li>
            </ul>
          </li>
          <!-- User Account: style can be found in dropdown.less -->
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <img th:src="@{/adminlte/dist/img/user2-160x160.jpg}" class="user-image" alt="User Image">
              <span class="hidden-xs">登录</span>
            </a>
            <ul class="dropdown-menu">
			<li><a href="/page/adminlogin"><i class="fa fa-circle-o"></i> 管理员登录</a></li>
            <li><a href="/page/login"><i class="fa fa-circle-o"></i> 商家登录</a></li>

            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
          <li>
            <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
     
      
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
     <ul class="sidebar-menu" data-widget="tree">
        <li class="header">主菜单</li>
        <li class="treeview">
          <a href="#">
            <i class="fa fa-dashboard"></i> <span>欢迎</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="/Mytest/guanlizhedu.js}p"><i class="fa fa-circle-o"></i> 欢迎进入网上商城系统</a></li>
            <!-- <li><a href="/Mytest/zhaopinzhedu.js}p"><i class="fa fa-circle-o"></i> 招聘者登录</a></li>
            <li><a href="/Mytest/yingpinzhedu.js}p"><i class="fa fa-circle-o"></i> 应聘者登录</a></li> -->
          </ul>
        </li>
        
        
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
     	   网上商城
        <small>后台管理</small>
      </h1>
     
    </section>
<!--<% List<News> listnews = new ArrayList<>();
            
            System.out.println("hello");
           
            Connection con = JDBCUtil.getConnection();
            System.out.println(con);
            try {
                PreparedStatement ps = con.prepareStatement("SELECT * from t_news");
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    //id name password
                    int id = rs.getInt(1);
                    String ntitle = rs.getString(2);
                    String ncontent = rs.getString(3);
                    listnews.add(new News(id,ntitle, ncontent));
                }
            } catch (SQLException e) {
                e.printStackTrace();
            } %>!-->
    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">

           <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">新闻</h3>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            <table id="example1" class="table table-bordered table-striped">
                              <thead>
                              <tr>
                                <th>新闻ID</th>
                                <th>新闻题目</th>
                                <th>新闻内容</th>
                                <th>编辑</th>
                              </tr>
                              </thead>
                              <tbody>
                              <tr th:each=" l: ${list}">
                                <td th:text="${l.newsid}"></td>
                                <td th:text="${l.newstitle}"></td>
                                <td th:text="${l.newscontent}"></td>
                                <td><a th:href="'/news/newsedit?id='+${l.newsid}+''" class="btn btn-primary btn-xs btn_update">更改</a></td>
<!--                                <td<a  th:href="@{'/liuyan/addliuyan?id='+${l.newsid}}">编辑</a></td>-->
<!--                                <td-->
<!--                                <a href="/user/adduser">-->
<!--                                  <button id="createBtn" type="submit" class="btn btn-info" style="margin-left: 30px">-->
<!--                                  录入-->
<!--                                </button>-->
<!--                                 </a></td>-->

                                <!--<td><a th:href="'/product/product_edit?pId='+${p.pId}+''" class="btn btn-primary btn-xs btn_update">更改</a></td>-->
                              </tr>

                              </tbody>
                            </table>
                        </div>
                        <!-- /.box-body -->
                    </div>
          <!-- /.box -->

          <div class="box">
            <div class="box-header">
              <h3 class="box-title">公告</h3>
            </div>
            
            
            
          <!--  <% List<Gonggao> listgonggao = new ArrayList<>();
            
            System.out.println("hello");
           
            /* Connection con = JDBCUtil.getConnection(); */
            System.out.println(con);
            try {
                PreparedStatement ps = con.prepareStatement("SELECT * from t_gonggao");
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    //id name password
                    int gonggaoId = rs.getInt(1);
                    String gonggaoTitle = rs.getString(2);
                    String gonggaoFabuzhe = rs.getString(3);
                    String gonggaoContent = rs.getString(4);
                    listgonggao.add(new Gonggao(gonggaoId,gonggaoTitle,gonggaoFabuzhe, gonggaoContent));
                }
            } catch (SQLException e) {
                e.printStackTrace();
            } %>-->
            
            <!-- /.box-header -->
           <div class="box-body">
           
              <!-- <p> 网站公告  "text-align:center"</p> -->
              
               <table id="example2" class="table table-bordered table-striped">
           
                <tr>
                  <th>公告编号</th>
                  <th>公告名</th>
                  <th>公告发布者</th>
                  <th>公告内容</th>
                </tr>
               
                 <!-- <% for (Gonggao g : listgonggao) {
    %>
    <tr>
        
        <td><%=g.getId() %></td>
        <td><%=g.getGaname() %></td>
        <td><%=g.getGfabuzhe() %></td>
         <td><%=g.getGcontent() %></td>
    </tr>
    <%
        }%> -->
                
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
          
         
          
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>商城系统</b> 0.0.1
    </div>
     <strong>倾情制作</strong>
  </footer>


</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script th:src="@{/adminlte/bower_components/jquery/dist/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script th:src="@{/adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
<!-- DataTables -->
<script th:src="@{/adminlte/bower_components/datatables.net/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/adminlte/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js}"></script>
<!-- SlimScroll -->
<script th:src="@{/adminlte/bower_components/jquery-slimscroll/jquery.slimscroll.min.js}"></script>
<!-- FastClick -->
<script th:src="@{/adminlte/bower_components/fastclick/lib/fastclick.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/adminlte/dist/js/adminlte.min.js}"></script>
<!-- AdminLTE for demo purposes -->
<script th:src="@{/adminlte/dist/js/demo.js}"></script>
<!-- page script -->
<script>
  $(function () {
    $('#example1').DataTable()
    $('#example2').DataTable({
      'paging'      : true,
      'lengthChange': false,
      'searching'   : false,
      'ordering'    : true,
      'info'        : true,
      'autoWidth'   : false
    })
  })
</script>
</body>
</html>
>